import { request } from "@/utils/service"

// 京东所有订单查询
export function getOrderListApi(params: any) {
  return request<any>({
    url: "/order/jd/query",
    method: "get",
    params
  })
}

// 京东提交订单
export function addOrderListApi(data: any) {
  return request({
    url: "/order/jd/submit",
    method: "post",
    data
  })
}
// 京东提交订单
export function addOrderListApi1(data: any) {
  return request({
    url: "/order/jd/submit2",
    method: "post",
    data
  })
}

// 京东配置店铺查询
export function getsettingApi(params: any) {
  return request<any>({
    url: "/jd/QueryJD",
    method: "get",
    params
  })
}
// 京东配置店铺增加
export function addsettingApi(data: any) {
  return request<any>({
    url: "/jd/add",
    method: "post",
    data
  })
}
// 京东配置店铺修改
export function updatasettingApi(data: any) {
  return request<any>({
    url: "/jd/update",
    method: "put",
    data
  })
}
// 京东配置店铺删除
export function delsettingApi(id: any) {
  return request<any>({
    url: "/jd/delShop",
    method: "delete",
    params: {
      id
    }
  })
}

// 校验
/** 查 */
export function getTbFrontDataApi(params: any) {
  return request<any>({
    url: "order/packageTb/query",
    method: "get",
    params
  })
}
// 增
export function createTbForntApi(data: any) {
  return request({
    url: "/order/packageTb/addType",
    method: "post",
    data
  })
}

/** 删 */
export function deleteTbFrontDataApi(id: string) {
  return request({
    url: "order/packageTb/del",
    method: "delete",
    params: {
      id
    }
  })
}

/** 改 */
export function updateTbFrontDataApi(data: any) {
  return request({
    url: "order/packageTb/update",
    method: "put",
    data
  })
}
